{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "# import modules\n",
    "import pandas\n",
    "from sklearn import svm\n",
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "from sklearn.decomposition import PCA\n",
    "from pylab import *\n",
    "import struct\n",
    "import keras as ks\n",
    "import logging\n",
    "from keras.layers import Dense, Activation, Flatten, Convolution2D\n",
    "from keras.utils import np_utils\n",
    "from keras.models import model_from_json\n",
    "from keras import backend as K\n",
    "\n",
    "from sklearn.neighbors import KNeighborsClassifier\n",
    "from sklearn.tree import DecisionTreeClassifier\n",
    "from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "from skimage import io\n",
    "import numpy as np\n",
    "from PIL import Image \n",
    "from scipy import misc\n",
    "import os\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.metrics import classification_report\n",
    "# ..."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据读取和预处理\n",
    "label 3个 => 4个\n",
    "- normal: 2462\n",
    "- cpu   : 373\n",
    "- mem   : 266\n",
    "- io    : 592"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2462\n",
      "373\n",
      "266\n",
      "592\n",
      "(3693,)\n"
     ]
    }
   ],
   "source": [
    "# 3888 * 51 with 4 labels\n",
    "data_raw = pandas.read_csv(\"data/host10280-labeled-2.csv\")\n",
    "data = np.array(data_raw)\n",
    "data_raw = pandas.read_csv(\"data/host10274-labeled-2.csv\")\n",
    "data = np.concatenate((data,np.array(data_raw)),axis=0)\n",
    "data_raw = pandas.read_csv(\"data/host10283-labeled-2.csv\")\n",
    "data = np.concatenate((data,np.array(data_raw)),axis=0)\n",
    "\n",
    "# 50 = 2 ids + 45 features + 3 labels\n",
    "# ids: host + clock\n",
    "# labels: normal, cpu, mem, io\n",
    "data_features = data[:,2:47]\n",
    "data_labels = data[:,46:50]\n",
    "\n",
    "len(data_labels)\n",
    "for i in range(len(data_labels)):\n",
    "    item = data_labels[i]\n",
    "    if item[1] == 0 and item[2] == 0 and item[3] == 0:\n",
    "        data_labels[i][0] = 1\n",
    "    else:\n",
    "        data_labels[i][0] = 0\n",
    "\n",
    "data_class = [] # 0 ~ 3\n",
    "for label in data_labels:\n",
    "    data_class.append(np.dot([0,1,2,3],label))\n",
    "data_class = np.array(data_class,dtype=\"int\")\n",
    "\n",
    "print(sum(data_class == 0))\n",
    "print(sum(data_class == 1))\n",
    "print(sum(data_class == 2))\n",
    "print(sum(data_class == 3))\n",
    "print(data_class.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1231 abnormal\n",
    "num_sample = sum(data_class != 0)\n",
    "# select 1231 normal samples randomly\n",
    "data_tmp = data_features[data_class == 0]\n",
    "index_tmp = np.arange(0,data_tmp.shape[0],data_tmp.shape[0]/num_sample)[0:num_sample]\n",
    "data_normal_tmp = data_tmp[index_tmp]\n",
    "\n",
    "data_features = np.concatenate((data_normal_tmp,                 data_features[data_class != 0]),axis=0)\n",
    "data_labels   = np.concatenate((np.array([[1,0,0,0]]*num_sample),data_labels[data_class != 0]),  axis=0)\n",
    "data_class    = np.concatenate((np.array([0]*num_sample),        data_class[data_class != 0]),   axis=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 划分训练集和验证集\n",
    "- 训练集: 80%\n",
    "- 验证集: 20%"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1969, 45)\n",
      "(1969, 4)\n",
      "(1969,)\n",
      "(493, 45)\n",
      "(493, 4)\n",
      "(493,)\n"
     ]
    }
   ],
   "source": [
    "# feature scaling\n",
    "for i in range(data_features.shape[1]):\n",
    "    d_min = data_features[:,i].min()\n",
    "    d_max = data_features[:,i].max()\n",
    "    if d_min == d_max:\n",
    "        data_features[:,i] = 1\n",
    "        continue\n",
    "    data_features[:,i] -= d_min\n",
    "    data_features[:,i] /= (d_max - d_min)\n",
    "\n",
    "num_tosample = len(data_class)\n",
    "index_test = np.arange(0,num_tosample,5)\n",
    "index_train = np.array(list(set(np.arange(0,num_tosample,1)) - set(index_test)))\n",
    "\n",
    "data_train = data_features[index_train]\n",
    "labels_train = data_labels[index_train]\n",
    "class_train = data_class[index_train]\n",
    "data_test = data_features[index_test]\n",
    "labels_test = data_labels[index_test]\n",
    "class_test = data_class[index_test]\n",
    "print(data_train.shape)\n",
    "print(labels_train.shape)\n",
    "print(class_train.shape)\n",
    "print(data_test.shape)\n",
    "print(labels_test.shape)\n",
    "print(class_test.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "# save loss and acc\n",
    "class LossHistory(ks.callbacks.Callback):\n",
    "    def on_train_begin(self, logs={}):\n",
    "        self.losses = {'batch':[], 'epoch':[]}\n",
    "        self.accuracy = {'batch':[], 'epoch':[]}\n",
    "        self.val_loss = {'batch':[], 'epoch':[]}\n",
    "        self.val_acc = {'batch':[], 'epoch':[]}\n",
    "\n",
    "    def on_batch_end(self, batch, logs={}):\n",
    "        self.losses['batch'].append(logs.get('loss'))\n",
    "        self.accuracy['batch'].append(logs.get('acc'))\n",
    "        self.val_loss['batch'].append(logs.get('val_loss'))\n",
    "        self.val_acc['batch'].append(logs.get('val_acc'))\n",
    "\n",
    "    def on_epoch_end(self, batch, logs={}):\n",
    "        self.losses['epoch'].append(logs.get('loss'))\n",
    "        self.accuracy['epoch'].append(logs.get('acc'))\n",
    "        self.val_loss['epoch'].append(logs.get('val_loss'))\n",
    "        self.val_acc['epoch'].append(logs.get('val_acc'))\n",
    "\n",
    "    def loss_plot(self, loss_type):\n",
    "        iters = range(len(self.losses[loss_type]))\n",
    "        iindex = np.arange(0,len(self.losses[loss_type]),len(self.losses[loss_type])/200)\n",
    "        iters = np.array(iters)\n",
    "        plt.figure()\n",
    "        # acc\n",
    "        plt.plot(iters[iindex], np.array(self.accuracy[loss_type])[iindex], 'r', label='train acc')\n",
    "        # loss\n",
    "        plt.plot(iters[iindex], np.array(self.losses[loss_type])[iindex], 'g', label='train loss')\n",
    "        if loss_type == 'epoch':\n",
    "            # val_acc\n",
    "            plt.plot(iters[iindex], np.array(self.val_acc[loss_type])[iindex], 'b', label='val acc')\n",
    "            # val_loss\n",
    "            plt.plot(iters[iindex], np.array(self.val_loss[loss_type])[iindex], 'k', label='val loss')\n",
    "        plt.grid(True)\n",
    "        plt.xlabel(loss_type)\n",
    "        plt.ylabel('acc-loss')\n",
    "        plt.legend(loc=\"upper right\")\n",
    "        plt.savefig('fig.png')\n",
    "        plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 神经网络\n",
    "45 => 128 => 64 => 32 => 16 => 4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train on 1969 samples, validate on 493 samples\n",
      "Epoch 1/400\n",
      "1969/1969 [==============================] - 1s - loss: 1.3323 - acc: 0.4718 - val_loss: 1.2468 - val_acc: 0.6085\n",
      "Epoch 2/400\n",
      "1969/1969 [==============================] - 0s - loss: 1.1549 - acc: 0.6247 - val_loss: 1.0164 - val_acc: 0.6126\n",
      "Epoch 3/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.8809 - acc: 0.7080 - val_loss: 0.7829 - val_acc: 0.6024\n",
      "Epoch 4/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.7075 - acc: 0.6912 - val_loss: 0.5957 - val_acc: 0.7485\n",
      "Epoch 5/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.5172 - acc: 0.7902 - val_loss: 0.4565 - val_acc: 0.8479\n",
      "Epoch 6/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.4927 - acc: 0.7913 - val_loss: 0.3974 - val_acc: 0.8580\n",
      "Epoch 7/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.3788 - acc: 0.8558 - val_loss: 0.3647 - val_acc: 0.8580\n",
      "Epoch 8/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.3502 - acc: 0.8527 - val_loss: 0.3263 - val_acc: 0.8580\n",
      "Epoch 9/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.3306 - acc: 0.8532 - val_loss: 0.3133 - val_acc: 0.8621\n",
      "Epoch 10/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.3122 - acc: 0.8558 - val_loss: 0.3097 - val_acc: 0.8621\n",
      "Epoch 11/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.3068 - acc: 0.8568 - val_loss: 0.3086 - val_acc: 0.8600\n",
      "Epoch 12/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.3045 - acc: 0.8614 - val_loss: 0.2941 - val_acc: 0.8621\n",
      "Epoch 13/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2978 - acc: 0.8583 - val_loss: 0.2913 - val_acc: 0.8621\n",
      "Epoch 14/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2972 - acc: 0.8547 - val_loss: 0.2985 - val_acc: 0.8661\n",
      "Epoch 15/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2898 - acc: 0.8568 - val_loss: 0.3157 - val_acc: 0.8621\n",
      "Epoch 16/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2904 - acc: 0.8588 - val_loss: 0.2845 - val_acc: 0.8621\n",
      "Epoch 17/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2917 - acc: 0.8558 - val_loss: 0.3002 - val_acc: 0.8053\n",
      "Epoch 18/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2857 - acc: 0.8578 - val_loss: 0.2877 - val_acc: 0.8540\n",
      "Epoch 19/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2862 - acc: 0.8619 - val_loss: 0.3024 - val_acc: 0.8235\n",
      "Epoch 20/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2877 - acc: 0.8614 - val_loss: 0.2828 - val_acc: 0.8621\n",
      "Epoch 21/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2856 - acc: 0.8608 - val_loss: 0.2843 - val_acc: 0.8357\n",
      "Epoch 22/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2841 - acc: 0.8619 - val_loss: 0.2771 - val_acc: 0.8621\n",
      "Epoch 23/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2828 - acc: 0.8619 - val_loss: 0.2864 - val_acc: 0.8621\n",
      "Epoch 24/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2846 - acc: 0.8517 - val_loss: 0.2777 - val_acc: 0.8641\n",
      "Epoch 25/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2843 - acc: 0.8558 - val_loss: 0.2802 - val_acc: 0.8621\n",
      "Epoch 26/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2808 - acc: 0.8558 - val_loss: 0.2776 - val_acc: 0.8621\n",
      "Epoch 27/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2770 - acc: 0.8629 - val_loss: 0.2901 - val_acc: 0.8600\n",
      "Epoch 28/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2775 - acc: 0.8619 - val_loss: 0.2747 - val_acc: 0.8621\n",
      "Epoch 29/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2773 - acc: 0.8614 - val_loss: 0.2783 - val_acc: 0.8621\n",
      "Epoch 30/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2776 - acc: 0.8578 - val_loss: 0.2852 - val_acc: 0.8621\n",
      "Epoch 31/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2836 - acc: 0.8578 - val_loss: 0.2734 - val_acc: 0.8621\n",
      "Epoch 32/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2748 - acc: 0.8614 - val_loss: 0.2740 - val_acc: 0.8621\n",
      "Epoch 33/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2797 - acc: 0.8583 - val_loss: 0.2776 - val_acc: 0.8621\n",
      "Epoch 34/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2791 - acc: 0.8598 - val_loss: 0.2823 - val_acc: 0.8621\n",
      "Epoch 35/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2760 - acc: 0.8603 - val_loss: 0.2802 - val_acc: 0.8783\n",
      "Epoch 36/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2769 - acc: 0.8578 - val_loss: 0.2787 - val_acc: 0.8722\n",
      "Epoch 37/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2788 - acc: 0.8608 - val_loss: 0.2724 - val_acc: 0.8641\n",
      "Epoch 38/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2733 - acc: 0.8634 - val_loss: 0.2762 - val_acc: 0.8621\n",
      "Epoch 39/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2727 - acc: 0.8588 - val_loss: 0.2725 - val_acc: 0.8621\n",
      "Epoch 40/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2715 - acc: 0.8634 - val_loss: 0.2777 - val_acc: 0.8621\n",
      "Epoch 41/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2738 - acc: 0.8624 - val_loss: 0.2825 - val_acc: 0.8235\n",
      "Epoch 42/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2738 - acc: 0.8598 - val_loss: 0.2926 - val_acc: 0.8195\n",
      "Epoch 43/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2731 - acc: 0.8603 - val_loss: 0.2750 - val_acc: 0.8621\n",
      "Epoch 44/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2733 - acc: 0.8619 - val_loss: 0.2737 - val_acc: 0.8600\n",
      "Epoch 45/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2761 - acc: 0.8558 - val_loss: 0.2742 - val_acc: 0.8600\n",
      "Epoch 46/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2703 - acc: 0.8619 - val_loss: 0.2712 - val_acc: 0.8621\n",
      "Epoch 47/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2689 - acc: 0.8629 - val_loss: 0.3026 - val_acc: 0.8600\n",
      "Epoch 48/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2701 - acc: 0.8619 - val_loss: 0.2756 - val_acc: 0.8621\n",
      "Epoch 49/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2690 - acc: 0.8644 - val_loss: 0.2798 - val_acc: 0.8621\n",
      "Epoch 50/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2720 - acc: 0.8629 - val_loss: 0.2675 - val_acc: 0.8600\n",
      "Epoch 51/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2679 - acc: 0.8578 - val_loss: 0.2700 - val_acc: 0.8621\n",
      "Epoch 52/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2686 - acc: 0.8624 - val_loss: 0.2836 - val_acc: 0.8621\n",
      "Epoch 53/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2696 - acc: 0.8669 - val_loss: 0.2683 - val_acc: 0.8621\n",
      "Epoch 54/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2669 - acc: 0.8700 - val_loss: 0.2662 - val_acc: 0.8621\n",
      "Epoch 55/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2678 - acc: 0.8563 - val_loss: 0.2704 - val_acc: 0.8702\n",
      "Epoch 56/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2644 - acc: 0.8603 - val_loss: 0.2779 - val_acc: 0.8600\n",
      "Epoch 57/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2690 - acc: 0.8608 - val_loss: 0.2631 - val_acc: 0.8621\n",
      "Epoch 58/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2670 - acc: 0.8664 - val_loss: 0.2654 - val_acc: 0.8600\n",
      "Epoch 59/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2695 - acc: 0.8629 - val_loss: 0.2658 - val_acc: 0.8621\n",
      "Epoch 60/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.2673 - acc: 0.875 - 0s - loss: 0.2669 - acc: 0.8629 - val_loss: 0.2612 - val_acc: 0.8621\n",
      "Epoch 61/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2662 - acc: 0.8705 - val_loss: 0.3130 - val_acc: 0.8053\n",
      "Epoch 62/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2749 - acc: 0.8649 - val_loss: 0.2825 - val_acc: 0.8134\n",
      "Epoch 63/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2655 - acc: 0.8685 - val_loss: 0.2655 - val_acc: 0.8600\n",
      "Epoch 64/400\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1969/1969 [==============================] - 0s - loss: 0.2666 - acc: 0.8537 - val_loss: 0.2613 - val_acc: 0.8600\n",
      "Epoch 65/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2632 - acc: 0.8690 - val_loss: 0.2717 - val_acc: 0.9026\n",
      "Epoch 66/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2626 - acc: 0.8685 - val_loss: 0.2617 - val_acc: 0.8600\n",
      "Epoch 67/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2625 - acc: 0.8725 - val_loss: 0.2672 - val_acc: 0.8600\n",
      "Epoch 68/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2616 - acc: 0.8700 - val_loss: 0.2648 - val_acc: 0.8600\n",
      "Epoch 69/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2614 - acc: 0.8614 - val_loss: 0.2639 - val_acc: 0.8925\n",
      "Epoch 70/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2638 - acc: 0.8685 - val_loss: 0.2614 - val_acc: 0.8803\n",
      "Epoch 71/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2629 - acc: 0.8659 - val_loss: 0.2851 - val_acc: 0.8600\n",
      "Epoch 72/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2603 - acc: 0.8659 - val_loss: 0.3159 - val_acc: 0.8053\n",
      "Epoch 73/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2627 - acc: 0.8644 - val_loss: 0.2647 - val_acc: 0.8580\n",
      "Epoch 74/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2629 - acc: 0.8664 - val_loss: 0.2824 - val_acc: 0.8580\n",
      "Epoch 75/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2637 - acc: 0.8619 - val_loss: 0.2562 - val_acc: 0.8641\n",
      "Epoch 76/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2588 - acc: 0.8593 - val_loss: 0.2621 - val_acc: 0.8600\n",
      "Epoch 77/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2569 - acc: 0.8771 - val_loss: 0.2789 - val_acc: 0.8580\n",
      "Epoch 78/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2568 - acc: 0.8695 - val_loss: 0.2532 - val_acc: 0.8641\n",
      "Epoch 79/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2595 - acc: 0.8746 - val_loss: 0.2640 - val_acc: 0.8600\n",
      "Epoch 80/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2603 - acc: 0.8634 - val_loss: 0.2736 - val_acc: 0.8438\n",
      "Epoch 81/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2677 - acc: 0.8674 - val_loss: 0.2942 - val_acc: 0.8600\n",
      "Epoch 82/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2612 - acc: 0.8680 - val_loss: 0.2559 - val_acc: 0.8763\n",
      "Epoch 83/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2571 - acc: 0.8710 - val_loss: 0.2718 - val_acc: 0.8499\n",
      "Epoch 84/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2543 - acc: 0.8725 - val_loss: 0.2592 - val_acc: 0.8803\n",
      "Epoch 85/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2552 - acc: 0.8685 - val_loss: 0.3019 - val_acc: 0.8053\n",
      "Epoch 86/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2566 - acc: 0.8751 - val_loss: 0.2817 - val_acc: 0.8600\n",
      "Epoch 87/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2555 - acc: 0.8685 - val_loss: 0.2568 - val_acc: 0.8742\n",
      "Epoch 88/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2516 - acc: 0.8710 - val_loss: 0.2861 - val_acc: 0.8600\n",
      "Epoch 89/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2517 - acc: 0.8807 - val_loss: 0.2557 - val_acc: 0.8641\n",
      "Epoch 90/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2522 - acc: 0.8669 - val_loss: 0.2535 - val_acc: 0.8621\n",
      "Epoch 91/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2600 - acc: 0.8593 - val_loss: 0.2531 - val_acc: 0.8641\n",
      "Epoch 92/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2520 - acc: 0.8685 - val_loss: 0.2664 - val_acc: 0.8337\n",
      "Epoch 93/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2509 - acc: 0.8659 - val_loss: 0.2797 - val_acc: 0.8600\n",
      "Epoch 94/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2521 - acc: 0.8827 - val_loss: 0.2746 - val_acc: 0.8418\n",
      "Epoch 95/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2589 - acc: 0.8746 - val_loss: 0.2505 - val_acc: 0.9026\n",
      "Epoch 96/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2574 - acc: 0.8746 - val_loss: 0.2850 - val_acc: 0.8580\n",
      "Epoch 97/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2490 - acc: 0.8771 - val_loss: 0.2585 - val_acc: 0.8418\n",
      "Epoch 98/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2502 - acc: 0.8771 - val_loss: 0.2653 - val_acc: 0.8540\n",
      "Epoch 99/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2544 - acc: 0.8776 - val_loss: 0.2503 - val_acc: 0.9087\n",
      "Epoch 100/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2428 - acc: 0.8903 - val_loss: 0.2522 - val_acc: 0.9087\n",
      "Epoch 101/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2553 - acc: 0.8674 - val_loss: 0.2608 - val_acc: 0.8641\n",
      "Epoch 102/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2449 - acc: 0.8847 - val_loss: 0.2534 - val_acc: 0.8580\n",
      "Epoch 103/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2449 - acc: 0.8832 - val_loss: 0.2652 - val_acc: 0.8580\n",
      "Epoch 104/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2470 - acc: 0.8725 - val_loss: 0.3842 - val_acc: 0.8032\n",
      "Epoch 105/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2582 - acc: 0.8751 - val_loss: 0.2770 - val_acc: 0.8235\n",
      "Epoch 106/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2516 - acc: 0.8639 - val_loss: 0.2561 - val_acc: 0.8560\n",
      "Epoch 107/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2486 - acc: 0.8685 - val_loss: 0.2761 - val_acc: 0.8235\n",
      "Epoch 108/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2454 - acc: 0.8873 - val_loss: 0.2442 - val_acc: 0.9026\n",
      "Epoch 109/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2498 - acc: 0.8837 - val_loss: 0.2433 - val_acc: 0.8722\n",
      "Epoch 110/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2355 - acc: 0.8913 - val_loss: 0.2403 - val_acc: 0.9067\n",
      "Epoch 111/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2368 - acc: 0.8862 - val_loss: 0.2745 - val_acc: 0.8235\n",
      "Epoch 112/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2383 - acc: 0.8756 - val_loss: 0.2922 - val_acc: 0.8560\n",
      "Epoch 113/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2443 - acc: 0.8847 - val_loss: 0.2588 - val_acc: 0.8661\n",
      "Epoch 114/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2438 - acc: 0.8817 - val_loss: 0.2549 - val_acc: 0.8600\n",
      "Epoch 115/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2398 - acc: 0.8893 - val_loss: 0.2409 - val_acc: 0.8641\n",
      "Epoch 116/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2347 - acc: 0.8842 - val_loss: 0.2363 - val_acc: 0.9006\n",
      "Epoch 117/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2444 - acc: 0.8669 - val_loss: 0.2462 - val_acc: 0.8945\n",
      "Epoch 118/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2360 - acc: 0.8822 - val_loss: 0.2558 - val_acc: 0.8803\n",
      "Epoch 119/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2319 - acc: 0.8979 - val_loss: 0.2749 - val_acc: 0.8580\n",
      "Epoch 120/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2426 - acc: 0.8796 - val_loss: 0.2385 - val_acc: 0.8945\n",
      "Epoch 121/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2351 - acc: 0.8893 - val_loss: 0.2347 - val_acc: 0.8864\n",
      "Epoch 122/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.2071 - acc: 0.898 - 0s - loss: 0.2283 - acc: 0.8984 - val_loss: 0.2780 - val_acc: 0.8357\n",
      "Epoch 123/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.2401 - acc: 0.882 - 0s - loss: 0.2307 - acc: 0.8903 - val_loss: 0.2665 - val_acc: 0.8580\n",
      "Epoch 124/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2468 - acc: 0.8715 - val_loss: 0.2774 - val_acc: 0.8580\n",
      "Epoch 125/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2353 - acc: 0.8913 - val_loss: 0.3087 - val_acc: 0.8580\n",
      "Epoch 126/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2323 - acc: 0.8888 - val_loss: 0.2548 - val_acc: 0.8621\n",
      "Epoch 127/400\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1969/1969 [==============================] - 0s - loss: 0.2298 - acc: 0.8908 - val_loss: 0.2472 - val_acc: 0.8641\n",
      "Epoch 128/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2366 - acc: 0.8837 - val_loss: 0.2437 - val_acc: 0.8600\n",
      "Epoch 129/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2445 - acc: 0.8690 - val_loss: 0.2487 - val_acc: 0.8844\n",
      "Epoch 130/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2342 - acc: 0.8903 - val_loss: 0.2335 - val_acc: 0.8783\n",
      "Epoch 131/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2309 - acc: 0.8939 - val_loss: 0.2306 - val_acc: 0.9108\n",
      "Epoch 132/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2374 - acc: 0.8812 - val_loss: 0.2392 - val_acc: 0.9047\n",
      "Epoch 133/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.1982 - acc: 0.921 - 0s - loss: 0.2207 - acc: 0.8999 - val_loss: 0.2689 - val_acc: 0.8418\n",
      "Epoch 134/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2417 - acc: 0.8796 - val_loss: 0.2787 - val_acc: 0.8337\n",
      "Epoch 135/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2455 - acc: 0.8812 - val_loss: 0.2380 - val_acc: 0.8661\n",
      "Epoch 136/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2316 - acc: 0.8862 - val_loss: 0.2395 - val_acc: 0.8844\n",
      "Epoch 137/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2292 - acc: 0.8873 - val_loss: 0.2920 - val_acc: 0.8195\n",
      "Epoch 138/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2267 - acc: 0.8979 - val_loss: 0.2352 - val_acc: 0.9006\n",
      "Epoch 139/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2187 - acc: 0.9020 - val_loss: 0.2237 - val_acc: 0.9148\n",
      "Epoch 140/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2346 - acc: 0.8847 - val_loss: 0.2721 - val_acc: 0.8580\n",
      "Epoch 141/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2243 - acc: 0.8979 - val_loss: 0.2282 - val_acc: 0.8844\n",
      "Epoch 142/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2181 - acc: 0.8979 - val_loss: 0.2245 - val_acc: 0.9047\n",
      "Epoch 143/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.2523 - acc: 0.890 - 0s - loss: 0.2356 - acc: 0.8822 - val_loss: 0.2294 - val_acc: 0.9087\n",
      "Epoch 144/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2194 - acc: 0.8994 - val_loss: 0.2322 - val_acc: 0.9067\n",
      "Epoch 145/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2154 - acc: 0.9050 - val_loss: 0.2403 - val_acc: 0.8661\n",
      "Epoch 146/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2247 - acc: 0.8928 - val_loss: 0.2154 - val_acc: 0.9108\n",
      "Epoch 147/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.1969 - acc: 0.937 - 0s - loss: 0.2156 - acc: 0.8994 - val_loss: 0.2465 - val_acc: 0.8803\n",
      "Epoch 148/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2208 - acc: 0.8888 - val_loss: 0.2273 - val_acc: 0.8682\n",
      "Epoch 149/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2238 - acc: 0.8908 - val_loss: 0.2407 - val_acc: 0.9128\n",
      "Epoch 150/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2297 - acc: 0.8939 - val_loss: 0.2363 - val_acc: 0.8783\n",
      "Epoch 151/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2156 - acc: 0.8984 - val_loss: 0.2390 - val_acc: 0.8844\n",
      "Epoch 152/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2112 - acc: 0.9081 - val_loss: 0.3004 - val_acc: 0.8235\n",
      "Epoch 153/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2146 - acc: 0.9030 - val_loss: 0.2188 - val_acc: 0.9128\n",
      "Epoch 154/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2168 - acc: 0.8954 - val_loss: 0.2432 - val_acc: 0.8641\n",
      "Epoch 155/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2220 - acc: 0.8898 - val_loss: 0.2127 - val_acc: 0.9270\n",
      "Epoch 156/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2145 - acc: 0.9010 - val_loss: 0.2471 - val_acc: 0.8621\n",
      "Epoch 157/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2119 - acc: 0.9015 - val_loss: 0.2198 - val_acc: 0.9168\n",
      "Epoch 158/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2056 - acc: 0.9096 - val_loss: 0.2179 - val_acc: 0.8925\n",
      "Epoch 159/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2179 - acc: 0.8994 - val_loss: 0.2367 - val_acc: 0.8783\n",
      "Epoch 160/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2195 - acc: 0.8949 - val_loss: 0.2083 - val_acc: 0.9067\n",
      "Epoch 161/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2078 - acc: 0.8989 - val_loss: 0.2303 - val_acc: 0.8864\n",
      "Epoch 162/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2113 - acc: 0.9025 - val_loss: 0.2830 - val_acc: 0.8560\n",
      "Epoch 163/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2078 - acc: 0.9071 - val_loss: 0.2861 - val_acc: 0.8316\n",
      "Epoch 164/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2089 - acc: 0.8984 - val_loss: 0.2111 - val_acc: 0.9128\n",
      "Epoch 165/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2041 - acc: 0.9071 - val_loss: 0.2062 - val_acc: 0.9249\n",
      "Epoch 166/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.2329 - acc: 0.898 - 0s - loss: 0.2119 - acc: 0.9030 - val_loss: 0.2052 - val_acc: 0.9087\n",
      "Epoch 167/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2014 - acc: 0.9040 - val_loss: 0.2102 - val_acc: 0.9108\n",
      "Epoch 168/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2039 - acc: 0.9101 - val_loss: 0.2315 - val_acc: 0.8824\n",
      "Epoch 169/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2120 - acc: 0.8999 - val_loss: 0.2444 - val_acc: 0.8986\n",
      "Epoch 170/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2089 - acc: 0.9045 - val_loss: 0.2275 - val_acc: 0.8844\n",
      "Epoch 171/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.2201 - acc: 0.882 - 0s - loss: 0.2171 - acc: 0.8949 - val_loss: 0.2710 - val_acc: 0.8682\n",
      "Epoch 172/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2195 - acc: 0.8939 - val_loss: 0.2398 - val_acc: 0.8824\n",
      "Epoch 173/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1980 - acc: 0.9157 - val_loss: 0.2069 - val_acc: 0.9006\n",
      "Epoch 174/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1920 - acc: 0.9076 - val_loss: 0.2704 - val_acc: 0.8560\n",
      "Epoch 175/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2000 - acc: 0.9081 - val_loss: 0.2142 - val_acc: 0.8925\n",
      "Epoch 176/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2070 - acc: 0.9035 - val_loss: 0.2148 - val_acc: 0.8682\n",
      "Epoch 177/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2037 - acc: 0.8984 - val_loss: 0.2018 - val_acc: 0.9128\n",
      "Epoch 178/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1977 - acc: 0.9040 - val_loss: 0.2343 - val_acc: 0.8560\n",
      "Epoch 179/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1884 - acc: 0.9126 - val_loss: 0.2068 - val_acc: 0.9108\n",
      "Epoch 180/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2035 - acc: 0.9050 - val_loss: 0.2042 - val_acc: 0.9026\n",
      "Epoch 181/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1873 - acc: 0.9172 - val_loss: 0.2000 - val_acc: 0.9209\n",
      "Epoch 182/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1982 - acc: 0.9060 - val_loss: 0.2258 - val_acc: 0.8905\n",
      "Epoch 183/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2022 - acc: 0.9081 - val_loss: 0.2337 - val_acc: 0.8519\n",
      "Epoch 184/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1915 - acc: 0.9096 - val_loss: 0.1901 - val_acc: 0.9108\n",
      "Epoch 185/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1823 - acc: 0.9213 - val_loss: 0.2382 - val_acc: 0.8519\n",
      "Epoch 186/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1971 - acc: 0.9066 - val_loss: 0.2286 - val_acc: 0.8824\n",
      "Epoch 187/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2023 - acc: 0.9076 - val_loss: 0.2190 - val_acc: 0.8905\n",
      "Epoch 188/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1917 - acc: 0.9066 - val_loss: 0.2863 - val_acc: 0.8418\n",
      "Epoch 189/400\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1969/1969 [==============================] - 0s - loss: 0.1895 - acc: 0.9121 - val_loss: 0.2696 - val_acc: 0.8560\n",
      "Epoch 190/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1879 - acc: 0.9096 - val_loss: 0.2258 - val_acc: 0.8864\n",
      "Epoch 191/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1881 - acc: 0.9116 - val_loss: 0.2487 - val_acc: 0.8499\n",
      "Epoch 192/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1871 - acc: 0.9167 - val_loss: 0.1927 - val_acc: 0.9229\n",
      "Epoch 193/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1901 - acc: 0.9121 - val_loss: 0.2302 - val_acc: 0.8824\n",
      "Epoch 194/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.2012 - acc: 0.9055 - val_loss: 0.2107 - val_acc: 0.8945\n",
      "Epoch 195/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1808 - acc: 0.9167 - val_loss: 0.1968 - val_acc: 0.9108\n",
      "Epoch 196/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1929 - acc: 0.9086 - val_loss: 0.2404 - val_acc: 0.8519\n",
      "Epoch 197/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1949 - acc: 0.9040 - val_loss: 0.1851 - val_acc: 0.9331\n",
      "Epoch 198/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1815 - acc: 0.9177 - val_loss: 0.1945 - val_acc: 0.9108\n",
      "Epoch 199/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1824 - acc: 0.9157 - val_loss: 0.2395 - val_acc: 0.9209\n",
      "Epoch 200/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1871 - acc: 0.9192 - val_loss: 0.2466 - val_acc: 0.8600\n",
      "Epoch 201/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1921 - acc: 0.9055 - val_loss: 0.2016 - val_acc: 0.8722\n",
      "Epoch 202/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1820 - acc: 0.9126 - val_loss: 0.2067 - val_acc: 0.8966\n",
      "Epoch 203/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1968 - acc: 0.9121 - val_loss: 0.1868 - val_acc: 0.9128\n",
      "Epoch 204/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1839 - acc: 0.9198 - val_loss: 0.1837 - val_acc: 0.9108\n",
      "Epoch 205/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1758 - acc: 0.9152 - val_loss: 0.1789 - val_acc: 0.9351\n",
      "Epoch 206/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1868 - acc: 0.9157 - val_loss: 0.1851 - val_acc: 0.9249\n",
      "Epoch 207/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1782 - acc: 0.9147 - val_loss: 0.2159 - val_acc: 0.8844\n",
      "Epoch 208/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1803 - acc: 0.9167 - val_loss: 0.1991 - val_acc: 0.9087\n",
      "Epoch 209/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1711 - acc: 0.9238 - val_loss: 0.2096 - val_acc: 0.9067\n",
      "Epoch 210/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1760 - acc: 0.9228 - val_loss: 0.2401 - val_acc: 0.8560\n",
      "Epoch 211/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1859 - acc: 0.9096 - val_loss: 0.1819 - val_acc: 0.9249\n",
      "Epoch 212/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1701 - acc: 0.9284 - val_loss: 0.1767 - val_acc: 0.9209\n",
      "Epoch 213/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1758 - acc: 0.9223 - val_loss: 0.2276 - val_acc: 0.8641\n",
      "Epoch 214/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1790 - acc: 0.9152 - val_loss: 0.2045 - val_acc: 0.8884\n",
      "Epoch 215/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1641 - acc: 0.9304 - val_loss: 0.2127 - val_acc: 0.8925\n",
      "Epoch 216/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1782 - acc: 0.9126 - val_loss: 0.2070 - val_acc: 0.8884\n",
      "Epoch 217/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1658 - acc: 0.9289 - val_loss: 0.1888 - val_acc: 0.9168\n",
      "Epoch 218/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1835 - acc: 0.9101 - val_loss: 0.2505 - val_acc: 0.8925\n",
      "Epoch 219/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1752 - acc: 0.9152 - val_loss: 0.2018 - val_acc: 0.8783\n",
      "Epoch 220/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1653 - acc: 0.9319 - val_loss: 0.1998 - val_acc: 0.8986\n",
      "Epoch 221/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1621 - acc: 0.9208 - val_loss: 0.2391 - val_acc: 0.8600\n",
      "Epoch 222/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1800 - acc: 0.9182 - val_loss: 0.1819 - val_acc: 0.9229\n",
      "Epoch 223/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1775 - acc: 0.9162 - val_loss: 0.2347 - val_acc: 0.8844\n",
      "Epoch 224/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1666 - acc: 0.9218 - val_loss: 0.2002 - val_acc: 0.8966\n",
      "Epoch 225/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1686 - acc: 0.9243 - val_loss: 0.1870 - val_acc: 0.9148\n",
      "Epoch 226/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1784 - acc: 0.9177 - val_loss: 0.1809 - val_acc: 0.9391\n",
      "Epoch 227/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1665 - acc: 0.9253 - val_loss: 0.1741 - val_acc: 0.9148\n",
      "Epoch 228/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1591 - acc: 0.9233 - val_loss: 0.1699 - val_acc: 0.9391\n",
      "Epoch 229/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1680 - acc: 0.9233 - val_loss: 0.1917 - val_acc: 0.9128\n",
      "Epoch 230/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1664 - acc: 0.9304 - val_loss: 0.1697 - val_acc: 0.9351\n",
      "Epoch 231/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1694 - acc: 0.9223 - val_loss: 0.1947 - val_acc: 0.9168\n",
      "Epoch 232/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1608 - acc: 0.9259 - val_loss: 0.1642 - val_acc: 0.9189\n",
      "Epoch 233/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1919 - acc: 0.9101 - val_loss: 0.2041 - val_acc: 0.9047\n",
      "Epoch 234/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1593 - acc: 0.9289 - val_loss: 0.2877 - val_acc: 0.8621\n",
      "Epoch 235/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1777 - acc: 0.9147 - val_loss: 0.2041 - val_acc: 0.9108\n",
      "Epoch 236/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1621 - acc: 0.9279 - val_loss: 0.1874 - val_acc: 0.9067\n",
      "Epoch 237/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1623 - acc: 0.9203 - val_loss: 0.1810 - val_acc: 0.9087\n",
      "Epoch 238/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1533 - acc: 0.9304 - val_loss: 0.2074 - val_acc: 0.9148\n",
      "Epoch 239/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1593 - acc: 0.9304 - val_loss: 0.1943 - val_acc: 0.9047\n",
      "Epoch 240/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1747 - acc: 0.9157 - val_loss: 0.1661 - val_acc: 0.9168\n",
      "Epoch 241/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1575 - acc: 0.9248 - val_loss: 0.1966 - val_acc: 0.9148\n",
      "Epoch 242/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1642 - acc: 0.9269 - val_loss: 0.2257 - val_acc: 0.8722\n",
      "Epoch 243/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1621 - acc: 0.9177 - val_loss: 0.2182 - val_acc: 0.9148\n",
      "Epoch 244/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1538 - acc: 0.9243 - val_loss: 0.2160 - val_acc: 0.8925\n",
      "Epoch 245/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1809 - acc: 0.9162 - val_loss: 0.2447 - val_acc: 0.8824\n",
      "Epoch 246/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1659 - acc: 0.9213 - val_loss: 0.1942 - val_acc: 0.9067\n",
      "Epoch 247/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1561 - acc: 0.9223 - val_loss: 0.2949 - val_acc: 0.8519\n",
      "Epoch 248/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1671 - acc: 0.9233 - val_loss: 0.2224 - val_acc: 0.8803\n",
      "Epoch 249/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1532 - acc: 0.9335 - val_loss: 0.2916 - val_acc: 0.8499\n",
      "Epoch 250/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1656 - acc: 0.9218 - val_loss: 0.1914 - val_acc: 0.9148\n",
      "Epoch 251/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1726 - acc: 0.9121 - val_loss: 0.2560 - val_acc: 0.8986\n",
      "Epoch 252/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1500 - acc: 0.9375 - val_loss: 0.2227 - val_acc: 0.9148\n",
      "Epoch 253/400\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1969/1969 [==============================] - 0s - loss: 0.1567 - acc: 0.9304 - val_loss: 0.1749 - val_acc: 0.9249\n",
      "Epoch 254/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1408 - acc: 0.9385 - val_loss: 0.2258 - val_acc: 0.8722\n",
      "Epoch 255/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1685 - acc: 0.9198 - val_loss: 0.1623 - val_acc: 0.9229\n",
      "Epoch 256/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1614 - acc: 0.9162 - val_loss: 0.1944 - val_acc: 0.9067\n",
      "Epoch 257/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1704 - acc: 0.9172 - val_loss: 0.1823 - val_acc: 0.9148\n",
      "Epoch 258/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1464 - acc: 0.9365 - val_loss: 0.2415 - val_acc: 0.9026\n",
      "Epoch 259/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1664 - acc: 0.9157 - val_loss: 0.1787 - val_acc: 0.9067\n",
      "Epoch 260/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1469 - acc: 0.9360 - val_loss: 0.1787 - val_acc: 0.9209\n",
      "Epoch 261/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1659 - acc: 0.9157 - val_loss: 0.2320 - val_acc: 0.8682\n",
      "Epoch 262/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1595 - acc: 0.9172 - val_loss: 0.1829 - val_acc: 0.9087\n",
      "Epoch 263/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1552 - acc: 0.9223 - val_loss: 0.2089 - val_acc: 0.9067\n",
      "Epoch 264/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1459 - acc: 0.9325 - val_loss: 0.1644 - val_acc: 0.9229\n",
      "Epoch 265/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1465 - acc: 0.9360 - val_loss: 0.1573 - val_acc: 0.9371\n",
      "Epoch 266/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1516 - acc: 0.9314 - val_loss: 0.2951 - val_acc: 0.8824\n",
      "Epoch 267/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1550 - acc: 0.9274 - val_loss: 0.2014 - val_acc: 0.8966\n",
      "Epoch 268/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1504 - acc: 0.9274 - val_loss: 0.1816 - val_acc: 0.9249\n",
      "Epoch 269/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1460 - acc: 0.9335 - val_loss: 0.1595 - val_acc: 0.9412\n",
      "Epoch 270/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1510 - acc: 0.9335 - val_loss: 0.1674 - val_acc: 0.9229\n",
      "Epoch 271/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1536 - acc: 0.9259 - val_loss: 0.1819 - val_acc: 0.9189\n",
      "Epoch 272/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1627 - acc: 0.9284 - val_loss: 0.2264 - val_acc: 0.8864\n",
      "Epoch 273/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1643 - acc: 0.9218 - val_loss: 0.1522 - val_acc: 0.9331\n",
      "Epoch 274/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1622 - acc: 0.9233 - val_loss: 0.1603 - val_acc: 0.9331\n",
      "Epoch 275/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1554 - acc: 0.9294 - val_loss: 0.1827 - val_acc: 0.9087\n",
      "Epoch 276/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1480 - acc: 0.9340 - val_loss: 0.1534 - val_acc: 0.9209\n",
      "Epoch 277/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1440 - acc: 0.9345 - val_loss: 0.2121 - val_acc: 0.9067\n",
      "Epoch 278/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1523 - acc: 0.9309 - val_loss: 0.1825 - val_acc: 0.9209\n",
      "Epoch 279/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1510 - acc: 0.9309 - val_loss: 0.1736 - val_acc: 0.9209\n",
      "Epoch 280/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1524 - acc: 0.9294 - val_loss: 0.1759 - val_acc: 0.9189\n",
      "Epoch 281/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1490 - acc: 0.9269 - val_loss: 0.1766 - val_acc: 0.9087\n",
      "Epoch 282/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1445 - acc: 0.9294 - val_loss: 0.1628 - val_acc: 0.9290\n",
      "Epoch 283/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1302 - acc: 0.9426 - val_loss: 0.2236 - val_acc: 0.9026\n",
      "Epoch 284/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1673 - acc: 0.9223 - val_loss: 0.1697 - val_acc: 0.9087\n",
      "Epoch 285/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1633 - acc: 0.9167 - val_loss: 0.1812 - val_acc: 0.9249\n",
      "Epoch 286/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1478 - acc: 0.9319 - val_loss: 0.1621 - val_acc: 0.9331\n",
      "Epoch 287/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1521 - acc: 0.9264 - val_loss: 0.2219 - val_acc: 0.9067\n",
      "Epoch 288/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1560 - acc: 0.9269 - val_loss: 0.1561 - val_acc: 0.9209\n",
      "Epoch 289/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1368 - acc: 0.9340 - val_loss: 0.1769 - val_acc: 0.9148\n",
      "Epoch 290/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1593 - acc: 0.9299 - val_loss: 0.1622 - val_acc: 0.9310\n",
      "Epoch 291/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1399 - acc: 0.9335 - val_loss: 0.2168 - val_acc: 0.9067\n",
      "Epoch 292/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1583 - acc: 0.9253 - val_loss: 0.2009 - val_acc: 0.9148\n",
      "Epoch 293/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1533 - acc: 0.9243 - val_loss: 0.1775 - val_acc: 0.9209\n",
      "Epoch 294/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1615 - acc: 0.9218 - val_loss: 0.1608 - val_acc: 0.9249\n",
      "Epoch 295/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1424 - acc: 0.9294 - val_loss: 0.2180 - val_acc: 0.8844\n",
      "Epoch 296/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1444 - acc: 0.9279 - val_loss: 0.1531 - val_acc: 0.9189\n",
      "Epoch 297/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1346 - acc: 0.9380 - val_loss: 0.1758 - val_acc: 0.9108\n",
      "Epoch 298/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1351 - acc: 0.9396 - val_loss: 0.1896 - val_acc: 0.9189\n",
      "Epoch 299/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1399 - acc: 0.9355 - val_loss: 0.1767 - val_acc: 0.9189\n",
      "Epoch 300/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1604 - acc: 0.9233 - val_loss: 0.1524 - val_acc: 0.9229\n",
      "Epoch 301/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1299 - acc: 0.9396 - val_loss: 0.1693 - val_acc: 0.9249\n",
      "Epoch 302/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1388 - acc: 0.9340 - val_loss: 0.1606 - val_acc: 0.9310\n",
      "Epoch 303/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1516 - acc: 0.9304 - val_loss: 0.1742 - val_acc: 0.9168\n",
      "Epoch 304/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1480 - acc: 0.9259 - val_loss: 0.1780 - val_acc: 0.9270\n",
      "Epoch 305/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1302 - acc: 0.9421 - val_loss: 0.1440 - val_acc: 0.9412\n",
      "Epoch 306/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1538 - acc: 0.9264 - val_loss: 0.2024 - val_acc: 0.9148\n",
      "Epoch 307/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1303 - acc: 0.9421 - val_loss: 0.1439 - val_acc: 0.9371\n",
      "Epoch 308/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1316 - acc: 0.9385 - val_loss: 0.2221 - val_acc: 0.8966\n",
      "Epoch 309/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1571 - acc: 0.9228 - val_loss: 0.2413 - val_acc: 0.8844\n",
      "Epoch 310/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1266 - acc: 0.9446 - val_loss: 0.1442 - val_acc: 0.9412\n",
      "Epoch 311/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1363 - acc: 0.9350 - val_loss: 0.1811 - val_acc: 0.9168\n",
      "Epoch 312/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1469 - acc: 0.9340 - val_loss: 0.1779 - val_acc: 0.9189\n",
      "Epoch 313/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1287 - acc: 0.9380 - val_loss: 0.2892 - val_acc: 0.8763\n",
      "Epoch 314/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1407 - acc: 0.9309 - val_loss: 0.1490 - val_acc: 0.9371\n",
      "Epoch 315/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1297 - acc: 0.9391 - val_loss: 0.1683 - val_acc: 0.9310\n",
      "Epoch 316/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1189 - acc: 0.9482 - val_loss: 0.1427 - val_acc: 0.9412\n",
      "Epoch 317/400\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1969/1969 [==============================] - 0s - loss: 0.1320 - acc: 0.9330 - val_loss: 0.1809 - val_acc: 0.9128\n",
      "Epoch 318/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1631 - acc: 0.9187 - val_loss: 0.1599 - val_acc: 0.9310\n",
      "Epoch 319/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1371 - acc: 0.9330 - val_loss: 0.2104 - val_acc: 0.9209\n",
      "Epoch 320/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1431 - acc: 0.9335 - val_loss: 0.2076 - val_acc: 0.9087\n",
      "Epoch 321/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1326 - acc: 0.9375 - val_loss: 0.1582 - val_acc: 0.9128\n",
      "Epoch 322/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1434 - acc: 0.9380 - val_loss: 0.1645 - val_acc: 0.9209\n",
      "Epoch 323/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1439 - acc: 0.9319 - val_loss: 0.1591 - val_acc: 0.9290\n",
      "Epoch 324/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1312 - acc: 0.9401 - val_loss: 0.1556 - val_acc: 0.9290\n",
      "Epoch 325/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1396 - acc: 0.9355 - val_loss: 0.2161 - val_acc: 0.9006\n",
      "Epoch 326/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1286 - acc: 0.9365 - val_loss: 0.2165 - val_acc: 0.9067\n",
      "Epoch 327/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1357 - acc: 0.9365 - val_loss: 0.1850 - val_acc: 0.9148\n",
      "Epoch 328/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1327 - acc: 0.9365 - val_loss: 0.2056 - val_acc: 0.9168\n",
      "Epoch 329/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1403 - acc: 0.9340 - val_loss: 0.1421 - val_acc: 0.9432\n",
      "Epoch 330/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1249 - acc: 0.9421 - val_loss: 0.1895 - val_acc: 0.9189\n",
      "Epoch 331/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1413 - acc: 0.9380 - val_loss: 0.1485 - val_acc: 0.9432\n",
      "Epoch 332/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1248 - acc: 0.9441 - val_loss: 0.2601 - val_acc: 0.8966\n",
      "Epoch 333/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1380 - acc: 0.9330 - val_loss: 0.2712 - val_acc: 0.9108\n",
      "Epoch 334/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1328 - acc: 0.9416 - val_loss: 0.1908 - val_acc: 0.9168\n",
      "Epoch 335/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1398 - acc: 0.9355 - val_loss: 0.1391 - val_acc: 0.9290\n",
      "Epoch 336/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1251 - acc: 0.9411 - val_loss: 0.2140 - val_acc: 0.9229\n",
      "Epoch 337/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1373 - acc: 0.9370 - val_loss: 0.1389 - val_acc: 0.9473\n",
      "Epoch 338/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1200 - acc: 0.9421 - val_loss: 0.2240 - val_acc: 0.9047\n",
      "Epoch 339/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1618 - acc: 0.9248 - val_loss: 0.1943 - val_acc: 0.9108\n",
      "Epoch 340/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1301 - acc: 0.9411 - val_loss: 0.1370 - val_acc: 0.9533\n",
      "Epoch 341/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1290 - acc: 0.9451 - val_loss: 0.2176 - val_acc: 0.9067\n",
      "Epoch 342/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1582 - acc: 0.9208 - val_loss: 0.1427 - val_acc: 0.9412\n",
      "Epoch 343/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1307 - acc: 0.9345 - val_loss: 0.1431 - val_acc: 0.9493\n",
      "Epoch 344/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1291 - acc: 0.9426 - val_loss: 0.1421 - val_acc: 0.9351\n",
      "Epoch 345/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1324 - acc: 0.9355 - val_loss: 0.1558 - val_acc: 0.9310\n",
      "Epoch 346/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1269 - acc: 0.9421 - val_loss: 0.1660 - val_acc: 0.9148\n",
      "Epoch 347/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1422 - acc: 0.9269 - val_loss: 0.1720 - val_acc: 0.9189\n",
      "Epoch 348/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1215 - acc: 0.9446 - val_loss: 0.1465 - val_acc: 0.9351\n",
      "Epoch 349/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1371 - acc: 0.9319 - val_loss: 0.2353 - val_acc: 0.8945\n",
      "Epoch 350/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1231 - acc: 0.9477 - val_loss: 0.1965 - val_acc: 0.9168\n",
      "Epoch 351/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1471 - acc: 0.9284 - val_loss: 0.3098 - val_acc: 0.8783\n",
      "Epoch 352/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1363 - acc: 0.9350 - val_loss: 0.1898 - val_acc: 0.9249\n",
      "Epoch 353/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1422 - acc: 0.9350 - val_loss: 0.1500 - val_acc: 0.9331\n",
      "Epoch 354/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1115 - acc: 0.9538 - val_loss: 0.2618 - val_acc: 0.8864\n",
      "Epoch 355/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1483 - acc: 0.9304 - val_loss: 0.1321 - val_acc: 0.9351\n",
      "Epoch 356/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1308 - acc: 0.9401 - val_loss: 0.1983 - val_acc: 0.9168\n",
      "Epoch 357/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1212 - acc: 0.9431 - val_loss: 0.1425 - val_acc: 0.9452\n",
      "Epoch 358/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1139 - acc: 0.9523 - val_loss: 0.1854 - val_acc: 0.9148\n",
      "Epoch 359/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1156 - acc: 0.9497 - val_loss: 0.1741 - val_acc: 0.9229\n",
      "Epoch 360/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1309 - acc: 0.9365 - val_loss: 0.1679 - val_acc: 0.9189\n",
      "Epoch 361/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1202 - acc: 0.9411 - val_loss: 0.1518 - val_acc: 0.9351\n",
      "Epoch 362/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1385 - acc: 0.9345 - val_loss: 0.1700 - val_acc: 0.9290\n",
      "Epoch 363/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1166 - acc: 0.9446 - val_loss: 0.1570 - val_acc: 0.9371\n",
      "Epoch 364/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1447 - acc: 0.9299 - val_loss: 0.1569 - val_acc: 0.9249\n",
      "Epoch 365/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1138 - acc: 0.9477 - val_loss: 0.1328 - val_acc: 0.9473\n",
      "Epoch 366/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1203 - acc: 0.9462 - val_loss: 0.1379 - val_acc: 0.9371\n",
      "Epoch 367/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1326 - acc: 0.9325 - val_loss: 0.2381 - val_acc: 0.8925\n",
      "Epoch 368/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1567 - acc: 0.9218 - val_loss: 0.2000 - val_acc: 0.9209\n",
      "Epoch 369/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1468 - acc: 0.9304 - val_loss: 0.2542 - val_acc: 0.9026\n",
      "Epoch 370/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1461 - acc: 0.9319 - val_loss: 0.1422 - val_acc: 0.9493\n",
      "Epoch 371/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1210 - acc: 0.9446 - val_loss: 0.1570 - val_acc: 0.9331\n",
      "Epoch 372/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1288 - acc: 0.9355 - val_loss: 0.2125 - val_acc: 0.9148\n",
      "Epoch 373/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1350 - acc: 0.9330 - val_loss: 0.1772 - val_acc: 0.9229\n",
      "Epoch 374/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1261 - acc: 0.9406 - val_loss: 0.1551 - val_acc: 0.9310\n",
      "Epoch 375/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1253 - acc: 0.9370 - val_loss: 0.2325 - val_acc: 0.9189\n",
      "Epoch 376/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1338 - acc: 0.9385 - val_loss: 0.1465 - val_acc: 0.9290\n",
      "Epoch 377/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1282 - acc: 0.9391 - val_loss: 0.1477 - val_acc: 0.9473\n",
      "Epoch 378/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1320 - acc: 0.9391 - val_loss: 0.2184 - val_acc: 0.9087\n",
      "Epoch 379/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1201 - acc: 0.9467 - val_loss: 0.1374 - val_acc: 0.9391\n",
      "Epoch 380/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1174 - acc: 0.9446 - val_loss: 0.1360 - val_acc: 0.9432\n",
      "Epoch 381/400\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1969/1969 [==============================] - 0s - loss: 0.1260 - acc: 0.9401 - val_loss: 0.1988 - val_acc: 0.9148\n",
      "Epoch 382/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1298 - acc: 0.9406 - val_loss: 0.1650 - val_acc: 0.9270\n",
      "Epoch 383/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1333 - acc: 0.9375 - val_loss: 0.1597 - val_acc: 0.9249\n",
      "Epoch 384/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1281 - acc: 0.9406 - val_loss: 0.1564 - val_acc: 0.9310\n",
      "Epoch 385/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1198 - acc: 0.9462 - val_loss: 0.1329 - val_acc: 0.9513\n",
      "Epoch 386/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1497 - acc: 0.9289 - val_loss: 0.1631 - val_acc: 0.9229\n",
      "Epoch 387/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1315 - acc: 0.9411 - val_loss: 0.2254 - val_acc: 0.9006\n",
      "Epoch 388/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1326 - acc: 0.9355 - val_loss: 0.1606 - val_acc: 0.9229\n",
      "Epoch 389/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1320 - acc: 0.9314 - val_loss: 0.1486 - val_acc: 0.9371\n",
      "Epoch 390/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1150 - acc: 0.9441 - val_loss: 0.1437 - val_acc: 0.9270\n",
      "Epoch 391/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1217 - acc: 0.9391 - val_loss: 0.1301 - val_acc: 0.9371\n",
      "Epoch 392/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1157 - acc: 0.9446 - val_loss: 0.2054 - val_acc: 0.9168\n",
      "Epoch 393/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1309 - acc: 0.9380 - val_loss: 0.1802 - val_acc: 0.9229\n",
      "Epoch 394/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1286 - acc: 0.9401 - val_loss: 0.2139 - val_acc: 0.9108\n",
      "Epoch 395/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1139 - acc: 0.9467 - val_loss: 0.1429 - val_acc: 0.9432\n",
      "Epoch 396/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1409 - acc: 0.9355 - val_loss: 0.1548 - val_acc: 0.9249\n",
      "Epoch 397/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1298 - acc: 0.9375 - val_loss: 0.1524 - val_acc: 0.9371\n",
      "Epoch 398/400\n",
      "1969/1969 [==============================] - ETA: 0s - loss: 0.1216 - acc: 0.945 - 0s - loss: 0.1110 - acc: 0.9446 - val_loss: 0.1405 - val_acc: 0.9371\n",
      "Epoch 399/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1355 - acc: 0.9416 - val_loss: 0.1900 - val_acc: 0.9128\n",
      "Epoch 400/400\n",
      "1969/1969 [==============================] - 0s - loss: 0.1148 - acc: 0.9472 - val_loss: 0.1678 - val_acc: 0.9249\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.History at 0x1c24ca5110>"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model = ks.models.Sequential()\n",
    "model.add(Dense(128, input_dim=data_features.shape[1]))\n",
    "model.add(Activation('relu'))\n",
    "model.add(Dense(64))\n",
    "model.add(Activation('relu'))\n",
    "model.add(Dense(32))\n",
    "model.add(Activation('relu'))\n",
    "model.add(Dense(16))\n",
    "model.add(Activation('relu'))\n",
    "model.add(Dense(4))\n",
    "model.add(Activation('softmax'))\n",
    "history = LossHistory()\n",
    "\n",
    "model.compile(loss='categorical_crossentropy',optimizer='adadelta',metrics=['accuracy'])\n",
    "model.fit(x=data_train,y=labels_train,batch_size=128,nb_epoch=5000,verbose=1,validation_data=(data_test,labels_test),callbacks=[history])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXd4VEXbxu/JpocQCAFCEQIIKDUQOhhAEEEFBARBOggK\nFopYUESKr/JSLAjKh4oCUpUiiIKUANJr6FVqKCFAQnrbvb8/JrsppGxCloR3n9917bV7zs6Zuc/Z\nZO6ZZ+bMUSQhCIIgCADgUNACBEEQhMKDmIIgCIJgQUxBEARBsCCmIAiCIFgQUxAEQRAsiCkIgiAI\nFsQUBEEQBAtiCoIgCIIFMQVBEATBgmNBC8gtPj4+9PPzy9OxMTEx8PDwyF9B+URh1Sa6ckdh1QUU\nXm2iK3fkVdfBgwdvkyyZY0KSj9QrICCAeSUoKCjPx9qawqpNdOWOwqqLLLzaRFfuyKsuAAdoRR0r\n4SNBEATBgpiCIAiCYEFMQRAEQbDwyA00C4Lwv0tSUhJCQkIQHx9f0FLg5eWFU6dOFbSM+8hJl6ur\nK8qXLw8nJ6c85S+mIAhCoSEkJASenp7w8/ODUqpAtURFRcHT07NANWRGdrpI4s6dOwgJCUGlSpXy\nlL+EjwRBKDTEx8ejRIkSBW4IjypKKZQoUeKBelpiCoIgFCrEEB6MB71+dmMKx28dx7yL8xAWE1bQ\nUgRBEAotdmMKp8JOYeGVhQiNCS1oKYIgFFIiIiLw7bff5unY5557DhEREfms6OFjN6bgbHAGACQa\nEwtYiSAIhZXsTMFoNGZ77J9//olixYrZQtZDxW5Mwcmgp2clGZMKWIkgCIWVDz74AP/++y/8/f0x\nbtw4bN26Fa1bt8Yrr7yC2rVrAwBefPFFBAQEoGbNmpg7d67lWD8/P9y+fRuXLl3Ck08+iSFDhqBm\nzZpo164d4uLi7itr7dq1aNy4MerVq4e2bdsiNFRHMaKjozFw4EDUrl0bderUwYoVKwAA69evR/36\n9dGsWTO0adPGZtfAbqakmnsKS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fCnOAuF/jeUmchsFIpVQooLSJbLOXzgGWW/FYVRGQVgIhk\nAFj2t0tETlq2o4DKwNbCPy2N5s5op6DR3IwC5onIiHyFSo26od7tcsTcLiSUmed1Dvp/qHmA0OEj\njeZmNgEvKqW8wFh/uRLm/4s1U2U3YKuIXAQuKKVaWMp7AlvEvJbBSaVUJ8s+HJRSzkV6FhrNfaDv\nUDSaGxCRaKXUB5hXx7PBnKn1DeAKUFsptQfzClddLB/pBXxluej/DbxmKe8JfK2UGmfZx0tFeBoa\nzX2hs6RqNHeJUuqyiJQobh0aTWGiw0cajUajMdAtBY1Go9EY6JaCRqPRaAy0U9BoNBqNgXYKGo1G\nozHQTkGj0Wg0BtopaDQajcZAOwWNRqPRGPw/n/hEXLSjje8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1c25ae8b10>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "history.loss_plot('epoch')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [],
   "source": [
    "def predict(model,data):\n",
    "    tmp_res = model.predict(data)\n",
    "    res = []\n",
    "    for item in tmp_res:\n",
    "        res.append(np.where(item == max(item))[0][0])\n",
    "    return np.array(res)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train: 0.987829614604\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       984\n",
      "        cpu       0.96      1.00      0.98       299\n",
      "        mem       1.00      0.96      0.98       212\n",
      "         io       1.00      0.99      1.00       474\n",
      "\n",
      "avg / total       0.99      0.99      0.99      1969\n",
      "\n",
      "test: 0.983772819473\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       247\n",
      "        cpu       0.93      1.00      0.96        74\n",
      "        mem       1.00      0.93      0.96        54\n",
      "         io       0.98      0.97      0.97       118\n",
      "\n",
      "avg / total       0.98      0.98      0.98       493\n",
      "\n"
     ]
    }
   ],
   "source": [
    "y_true = class_train\n",
    "y_pred = predict(model,data_train)\n",
    "target_names = ['normal', 'cpu', 'mem', 'io']\n",
    "print(\"train: {}\".format(clf.score(mid_features_test, class_test)))\n",
    "print(classification_report(y_true, y_pred, target_names=target_names))\n",
    "\n",
    "# print(\"test: {}\".format(clf.score(mid_features_test, class_test)))\n",
    "y_true = class_test\n",
    "y_pred = predict(model,data_test)\n",
    "print(\"test: {}\".format(sum(y_true == y_pred)/float(len(y_true))))\n",
    "print(classification_report(y_true, y_pred, target_names=target_names))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 神经网络 + SVM\n",
    "45 => 128 => 64 => 32 => 16 => SVM"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.98781107161\n",
      "0.987829614604\n",
      "train: 0.98781107161\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       984\n",
      "        cpu       0.98      0.95      0.96       299\n",
      "        mem       1.00      0.98      0.99       212\n",
      "         io       0.96      0.99      0.98       474\n",
      "\n",
      "avg / total       0.99      0.99      0.99      1969\n",
      "\n",
      "test: 0.987829614604\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       247\n",
      "        cpu       0.99      0.96      0.97        74\n",
      "        mem       1.00      0.96      0.98        54\n",
      "         io       0.96      0.99      0.97       118\n",
      "\n",
      "avg / total       0.99      0.99      0.99       493\n",
      "\n"
     ]
    }
   ],
   "source": [
    "get_feature = K.function([model.layers[0].input],[model.layers[4].output])\n",
    "mid_features_train = get_feature([data_train])[0]\n",
    "mid_features_test  = get_feature([data_test])[0]\n",
    "clf = svm.SVC()\n",
    "clf.fit(mid_features_train, class_train)\n",
    "\n",
    "print(\"train: {}\".format(clf.score(mid_features_train, class_train)))\n",
    "y_true = class_train\n",
    "y_pred = clf.predict(mid_features_train)\n",
    "target_names = ['normal', 'cpu', 'mem', 'io']\n",
    "print(classification_report(y_true, y_pred, target_names=target_names))\n",
    "\n",
    "print(\"test: {}\".format(clf.score(mid_features_test, class_test)))\n",
    "y_true = class_test\n",
    "y_pred = clf.predict(mid_features_test)\n",
    "print(classification_report(y_true, y_pred, target_names=target_names))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 其他机器学习算法\n",
    "- KNN\n",
    "- 线性SVM\n",
    "- 基于核函数的SVM (RBF SVM), Radial basis function kernel\n",
    "- 决策树\n",
    "- 随机森林"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Nearest Neighbors\n",
      "train: 0.973590655155\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       984\n",
      "        cpu       0.89      0.97      0.93       299\n",
      "        mem       0.95      0.90      0.92       212\n",
      "         io       0.98      0.96      0.97       474\n",
      "\n",
      "avg / total       0.97      0.97      0.97      1969\n",
      "\n",
      "test: 0.95537525355\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       247\n",
      "        cpu       0.84      0.93      0.88        74\n",
      "        mem       0.94      0.83      0.88        54\n",
      "         io       0.95      0.93      0.94       118\n",
      "\n",
      "avg / total       0.96      0.96      0.96       493\n",
      "\n",
      "\n",
      "\n",
      "Linear SVM\n",
      "train: 0.857287963433\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       984\n",
      "        cpu       1.00      0.45      0.63       299\n",
      "        mem       1.00      0.44      0.61       212\n",
      "         io       0.63      1.00      0.77       474\n",
      "\n",
      "avg / total       0.91      0.86      0.85      1969\n",
      "\n",
      "test: 0.855983772819\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       247\n",
      "        cpu       1.00      0.45      0.62        74\n",
      "        mem       1.00      0.44      0.62        54\n",
      "         io       0.62      1.00      0.77       118\n",
      "\n",
      "avg / total       0.91      0.86      0.85       493\n",
      "\n",
      "\n",
      "\n",
      "RBF SVM\n",
      "train: 0.858303707466\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       984\n",
      "        cpu       0.99      0.46      0.63       299\n",
      "        mem       1.00      0.44      0.61       212\n",
      "         io       0.63      1.00      0.77       474\n",
      "\n",
      "avg / total       0.91      0.86      0.85      1969\n",
      "\n",
      "test: 0.860040567951\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       247\n",
      "        cpu       1.00      0.47      0.64        74\n",
      "        mem       1.00      0.44      0.62        54\n",
      "         io       0.63      1.00      0.77       118\n",
      "\n",
      "avg / total       0.91      0.86      0.85       493\n",
      "\n",
      "\n",
      "\n",
      "Decision Tree\n",
      "train: 0.861350939563\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       984\n",
      "        cpu       1.00      0.80      0.89       299\n",
      "        mem       0.00      0.00      0.00       212\n",
      "         io       0.63      1.00      0.78       474\n",
      "\n",
      "avg / total       0.80      0.86      0.82      1969\n",
      "\n",
      "test: 0.860040567951\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       1.00      1.00      1.00       247\n",
      "        cpu       1.00      0.80      0.89        74\n",
      "        mem       0.00      0.00      0.00        54\n",
      "         io       0.63      1.00      0.77       118\n",
      "\n",
      "avg / total       0.80      0.86      0.82       493\n",
      "\n",
      "\n",
      "\n",
      "Random Forest\n",
      "train: 0.919756221432\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       0.92      0.98      0.95       984\n",
      "        cpu       0.97      0.83      0.89       299\n",
      "        mem       1.00      0.63      0.77       212\n",
      "         io       0.87      0.99      0.93       474\n",
      "\n",
      "avg / total       0.93      0.92      0.92      1969\n",
      "\n",
      "test: 0.914807302231\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "     normal       0.92      0.97      0.94       247\n",
      "        cpu       0.98      0.82      0.90        74\n",
      "        mem       1.00      0.63      0.77        54\n",
      "         io       0.85      0.98      0.91       118\n",
      "\n",
      "avg / total       0.92      0.91      0.91       493\n",
      "\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "classifiers = [\n",
    "    KNeighborsClassifier(4),\n",
    "    svm.SVC(kernel=\"linear\", C=0.025),\n",
    "    svm.SVC(),\n",
    "    DecisionTreeClassifier(max_depth=3),\n",
    "    RandomForestClassifier(max_depth=5, n_estimators=10, max_features=1)\n",
    "    ]\n",
    "names = [\"Nearest Neighbors\", \"Linear SVM\", \"RBF SVM\", \"Decision Tree\",\n",
    "         \"Random Forest\"]\n",
    "for name, clf in zip(names,classifiers):\n",
    "    clf.fit(data_train,class_train)\n",
    "    print(name)\n",
    "    print(\"train: {}\".format(clf.score(data_train, class_train)))\n",
    "    y_true = class_train\n",
    "    y_pred = clf.predict(data_train)\n",
    "    target_names = ['normal', 'cpu', 'mem', 'io']\n",
    "    print(classification_report(y_true, y_pred, target_names=target_names))\n",
    "    \n",
    "    print(\"test: {}\".format(clf.score(data_test, class_test)))\n",
    "    y_true = class_test\n",
    "    y_pred = clf.predict(data_test)\n",
    "    print(classification_report(y_true, y_pred, target_names=target_names))\n",
    "    print '\\n'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
